package common;

/**
 * Created by ilioili on 2015/2/3.
 */
public class LongString {
    public static final String HTML = "<!DOCTYPE html>\n" +
            "<html>\n" +
            "<head>\n" +
            "<title>加载失败</title>\n" +
            "<meta charset=\"utf-8\">\n" +
            "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n" +
            "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no\">\n" +
            "<style>\n" +
            "* {\n" +
            "\tfont-size: 16px;\n" +
            "}\n" +
            ".container {\n" +
            "\twidth: 100%;\n" +
            "\ttext-align: center;\n" +
            "\tposition: fixed;\n" +
            "\ttop: 40%;\n" +
            "\tcolor: #999;\n" +
            "}\n" +
            "#reload_btn {\n" +
            "\tcolor: #666;\n" +
            "\tborder-radius: 3px;\n" +
            "\tborder: 1px solid #999;\n" +
            "\tpadding: 5px 10px;\n" +
            "\tcursor: pointer;\n" +
            "\twidth: 150px;\n" +
            "\tmargin: 20px auto;\n" +
            "}\n" +
            "</style>\n" +
            "</head>\n" +
            "<body>\n" +
            "\t<div class=\"container\">\n" +
            "\t\t<div class=\"info\">网络出错啦，请点击按钮重新加载</div>\n" +
            "\t\t<div id=\"reload_btn\">重新加载</div>\n" +
            "\t</div>\n" +
            "\t<script>\n" +
            "        var Native = {\n" +
            "            // call原生接口\n" +
            "            call : function(command, params) {\n" +
            "                // android\n" +
            "                if (window.Android) {\n" +
            "                    Android[command](JSON.stringify(params));\n" +
            "                } else {\n" +
            "                    // ios\n" +
            "                    window.location = 'js-call:' + command + ':' + encodeURIComponent(JSON.stringify(params));\n" +
            "                }\n" +
            "            },\n" +
            "            // 添加接口供原生调用\n" +
            "            addInterface : function(name, func) {\n" +
            "                window[name] = func;\n" +
            "            }\n" +
            "        };\n" +
            "        document.getElementById('reload_btn').onclick = function() {\n" +
            "            Native.call('jsreload', {});\n" +
            "        }\n" +
            "    </script>\n" +
            "</body>\n" +
            "</html>";
}
